/*
 * Copyright 1999-2001,2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */ 

package org.apache.commons.workflow;


import java.util.EventListener;


/**
 * A <strong>ScopeListener</strong> registers its interest in receiving
 * <code>ScopeEvent</code> notifications when the occur on a particular
 * <code>Scope</code> of interest.
 *
 * @version $Revision: 155475 $ $Date: 2005-02-26 21:31:11 +0800 (六, 26  2 2005) $
 * @author Craig R. McClanahan
 */

public interface ScopeListener extends EventListener {


    // --------------------------------------------------------- Public Methods


    /**
     * Invoked when a new bean was added to this <code>scope</code>.
     *
     * @param event The <code>ScopeEvent</code> that has occurred
     */
    public void beanAdded(ScopeEvent event);


    /**
     * Invoked when an existing bean was removed in this <code>scope</code>.
     *
     * @param event The <code>ScopeEvent</code> that has occurred
     */
    public void beanRemoved(ScopeEvent event);


    /**
     * Invoked when an existing bean was replaced in this <code>scope</code>.
     *
     * @param event The <code>ScopeEvent</code> that has occurred
     */
    public void beanReplaced(ScopeEvent event);


    /**
     * Invoked when the entire Scope is cleared.
     *
     * @param event The <code>ScopeEvent</code> that has occurred
     */
    public void scopeCleared(ScopeEvent event);


}


